<%--
  Created by IntelliJ IDEA.
  User: 46796
  Date: 2020/12/23
  Time: 14:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
    <title>userInfo</title>
    <style>
        h3{
            color:red;
        }
        .dao{
            float:left;
            margin-right:50px;
        }
        #div1{
            margin-top:30px;
            margin-left:1220px;
            margin-right:auto;
        }
        #userName{
            font-size:37px;
            color:blue;
        }
    </style>
</head>
<body>
<div id="div1">
    <c:choose>
        <c:when test="${empty sessionScope.userName}">
            <a class="dao" href="login.jsp">登录</a>
            <a  class="dao" href="register.jsp">注册</a>
        </c:when>
        <c:otherwise>
            <h3>欢迎<span id="userName">${sessionScope.userName}</span>光临书城</h3>
            <a  class="dao" href="Cart.jsp">购物车</a>
            <a class="dao" href="../order?action=showMyAllOrders&userName=${sessionScope.userName}">我的订单</a>
            <a  class="dao" href="adminis.jsp">后台管理</a>
            <a class="dao" href="../action?action=loginOut">注销</a>
            <a class="dao" href="#">返回</a>
        </c:otherwise>
    </c:choose>
</div>
</body>
</html>
